//
//  GYX_SelectCycleViewController.m
//  MELive
//
//  Created by dllo on 16/10/20.
//  Copyright © 2016年 雅馨. All rights reserved.
//

#import "GYX_SelectCycleViewController.h"
#import <WebKit/WebKit.h>
#import "Macro.h"
#import "AFNetworking.h"
@interface GYX_SelectCycleViewController ()
@property (nonatomic, strong) WKWebView *webView;

@end

@implementation GYX_SelectCycleViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"loginBack50px"] style:UIBarButtonItemStylePlain target:self action:@selector(clickBackBtn:)];
    self.navigationItem.leftBarButtonItem = backButton;
    self.navigationController.interactivePopGestureRecognizer.delegate = (id)self;
    self.title = self.webTitle;
    [self creatWebView];
}
- (void)creatWebView {
    _webView = [[WKWebView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
    NSURL *url = [NSURL URLWithString:self.urlStr];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [_webView loadRequest:request];
    [self.view addSubview:_webView];
}
- (void)clickBackBtn:(UIBarButtonItem *)btn {
    [self.navigationController popViewControllerAnimated:YES];
}
@end
